-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make weather great again #158
Conversation
I'll dig into it more later today, just curious of the |
I focused on functionality and added the minor things I saw at a quick glance. A very nice improvement over all. |
I am not married to the name of the submodule. I have used it before for "source" code. I just wanted to name it something on the equivalent of the dialog or vocab directory. |
Ok then I get what you're going for. Sidenote: the dialog, vocab, regex folders should likely be merged into the locale folder which is the newer convention (the multifolder resource structure is deprecated) |
Is there a skill I can look at that uses the the newer convention? I've already moved a bunch of dialog and vobab files around. seems like a good time to update to the latest convention. |
I have never been a fan of the top level directory being a python package. There are so many files in there (README.md, requirements.txt, etc.) that are not python code. Long term, I think the |
6d10258
to
9b69f28
Compare
The spotify skill uses the locale and the mark-2 skill as well. Though neither of them uses the subfolder system very well (updating that in spotify at the moment) I agree that the Using a subfolder for all skill code I would also move the locale folder into the subfolder (since it's a resource for the code in that folder), doing that I think the only issue would be the way we determine the skill-id... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't been able to run it yet, just looked over the code and found a couple of nitpicks but nothing that really needs to be handled
QML pages are missing a background all pages or "mycroft.delegates" that require a solid background must assign one:
|
moved here from the standard weather-skill as this is for the 'great-again' version **Describe the comment all seemed reasonable timewise except a minor point To Reproduce Expected behavior MarkII-pi DEV-kit , network cable, uSDC Good Work - liking it |
What is the subfolder system for the locale folder? Right now I just have all the files in the folder for each locale. |
Why is the background necessary? Is it related to the issue where numbers don't show up sometimes? |
ran a test last night on a 'clean' image, followed one method of getting 'great-again' and no missing numbers |
the locale folder isn't as strict as the old regex/dialog/vocab folders so you can spread the files in subfolders, so you can group the files logically instead of by type only. For example create a folder called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some issues regarding to the sunrise / sunset intents.
What is left for this to be merged? I still need to change the WeatherDelegate to use the CardDelegate. Which I should be able to do tomorrow. That will take care of the background issue raised by Aix. Anything else I did not address? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issues I found seem to have been corrected but haven't had time to re-review the code. Changing my request changes to a comment so it's not blocking if anyone gets to the reviewing before me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving this refactor so much!
I assure you that any comments below are far outweighed by the list of great improvements :)
@@ -1,26 +1,47 @@ | |||
# <img src='https://rawgithub.com/FortAwesome/Font-Awesome/master/svgs/solid/sun.svg' card_color='#FEE255' width='50' height='50' style='vertical-align:bottom'/> Weather | |||
Weather conditions and forecasts | |||
|
|||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be more comfortable leaving this out until we have made a call on what the Mycroft official requirement is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the code IS formatted using Black. What if someone questions why the lines are longer than 79 characters? This is informational, not prescriptive. We can always remove it.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Utility functions for the weather skill.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to add some unit tests for these - they should be the simplest given they are pure.
Particularly useful as an example if we're going to point people to this as best practice.
…emoving a bunch of condition specific dialog files, code review changes and other minor cleanups.
f84ebe2
to
9ca144a
Compare
…tract some of the grid-style card layout commonalities.
…gain # Conflicts: # ui/DailyDelegateScalable.qml # ui/highlow.qml # ui/weather.qml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, there is more that we want to do here but merging this version as it's been well tested IRL and will fix known bugs in the current version of the Skill.
I am confused... this is merged into 20.08 ... |
This PR was generated before 21.02 existed. Should have changed the destination branch before merge but didn't. I will work with Gez to get this into 21.02. |
Yeah that was my bad - it has also been merged into 21.02 though and is compatible with both versions of mycroft-core. |
Description
Major refactor of the skill.
Looking at this PR might hurt your eyes. Might be easier just to checkout the branch and look at the changes holistically.
There are no docstrings or unit tests yet. The VK tests do pass and many of the expected fails no longer fail. Mostly putting this up to get feedback about the refactor.
Type of PR
Testing
VK tests pass. Install skill and have at it!
Documentation
As noted previously, no docstrings yet. But they will be added before merge.